﻿<%@ Page Language="c#" CodeBehind="Contract_Edit.aspx.cs" MasterPageFile="~/App_MasterPages/layout.Master"
    AutoEventWireup="false" Inherits="ud_gSDMS.contract.Contract_Edit" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">


<portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
    <mp:CornerRounderTop id="ctop1" runat="server" />
    <asp:Panel ID="pnlStoreManager" runat="server" CssClass="art-Post-inner panelwrapper gSDMS">
            <portal:ModuleTitleControlCustom ID="moduleTitle" runat="server" RenderArtisteer="true" UseLowerCaseArtisteerClasses="true"/>
        <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
        <div class="modulecontent">
            <fieldset>
<%--            <asp:UpdatePanel ID='updatePanel' runat="server" >
                <ContentTemplate>--%>
                    
                
                 <%--<mp:SiteLabel ID="lblInfo" CssClass="title info" runat="server" ResourceFile="gSDMSResource" ConfigKey="gSDMSHostingPackage" />--%>
                <div class="div_title">
                    <a href="/gsdmsmodule/contract/contract_cat.aspx?pageid=16">Contract</a>
                    &nbsp;>&nbsp;
                    <a href="">Edit</a>
                </div>
                

                <br /><br />

                <div class="div_Edit">
                    <table cellpadding='5' cellspacing='0' border='0' width='auto' class="tb_edit">
                         <tr >
                            <td colspan="4">
                                <table cellpadding=0 cellspacing=0 border=0>
                                    <tr class="div_title_parent">
                                        <td class="div_title div_title_group">CONTRACT INFORMATION:</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Contract code:</td>
                            <td class="input" colspan="3">
                                <asp:HiddenField ID="hidId" runat="server" />
                                <asp:HiddenField ID="hidCreatedOn" runat="server" />
                                

                                <asp:TextBox ID="txtContract_Code" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="txtContract_Code" SetFocusOnError="true" ErrorMessage="Please input Contract Code" Display="Dynamic" ID="req1" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Contract name:</td>
                            <td class="input" colspan="4">
                                <asp:TextBox ID="txtContract_Name" runat="server" CssClass="txtInput" MaxLength="100" Width="600"></asp:TextBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="txtContract_name" SetFocusOnError="true" ErrorMessage="Please input Contract Name" Display="Dynamic" ID="RequiredFieldValidator1" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                
                        <tr>
                            <td class="title">Contract date:</td>
                            <td class="input" colspan="3">
                                <telerik:RadDatePicker ID="datContract_Date" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10" 
                                       DatePopupButton-Width="23px" DatePopupButton-Height="23px"
                                >
                                    <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>

                                </telerik:RadDatePicker>
                                <span class="star">(*)</span>
                                <span class='span_note'>(dd/MM/yyyy)</span>
                                <asp:RequiredFieldValidator ControlToValidate="datContract_Date" SetFocusOnError="true" ErrorMessage="Please input Contract Date" Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Product category:</td>
                            <td class="input" colspan="3">
                                <telerik:RadComboBox ID="cboCat_Product_Package_ID" runat="server" CssClass ="cbo_rad" Width="200px"></telerik:RadComboBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="cboCat_Product_Package_ID" SetFocusOnError="true" ErrorMessage="Please select a Product Package" Display="Dynamic" ID="RequiredFieldValidator4" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Start date:</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datStart_Date" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10"
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px" 
                                >
                                     <Calendar >
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>
                                <span class='span_note'>(dd/MM/yyyy)</span>
                            </td>

                            <td class="title title_n1">End date:</td>
                            <td class="input"> 
                                <telerik:RadDatePicker ID="datEnd_Date" runat="server" 
                                        DateInput-DateFormat="dd/MM/yyyy" DateInput-CssClass="txtInput" DateInput-MaxLength="10"
                                        DatePopupButton-Width="23px" DatePopupButton-Height="23px"
                                >
                                     <Calendar>
                                        <SpecialDays>
                                            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-CssClass="rcToday" />
                                        </SpecialDays>
                                    </Calendar>
                                </telerik:RadDatePicker>
                                <span class='span_note'>(dd/MM/yyyy)</span>
                            </td>
                        </tr>
                       
                        <tr>
                            <td class="title">Resource (MD):</td>
                            <td class="input">
                                <asp:TextBox ID="txtResource" runat="server" CssClass="txtInput txtInputNum" MaxLength="10"></asp:TextBox>
                                <asp:CompareValidator ControlToValidate="txtResource" ValueToCompare="1" Operator="GreaterThanEqual" Type="Integer" SetFocusOnError="true" ErrorMessage="Resource number must be larger or equal 1 (>=1)" Display="Dynamic" ID="CompareValidator1" runat="server" ></asp:CompareValidator>
                            </td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                       
                       
                        <tr >
                            <td colspan="4">
                                <table cellpadding=0 cellspacing=0 border=0>
                                    <tr class="div_title_parent">
                                        <td class="div_title div_title_group">CUSTOMER INFORMATION:</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Customer code:</td>
                            <td class="input"><asp:TextBox ID="txtCustomer_Code" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="title">Customer name:</td>
                            <td class="input" colspan=3>
                                <asp:TextBox ID="txtCustomer_Name" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="txtCustomer_Name" SetFocusOnError="true" ErrorMessage="Please input Customer Name" Display="Dynamic" ID="RequiredFieldValidator3" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Phone:</td>
                            <td class="input" colspan=3>
                                <asp:TextBox ID="txtCustomer_Phone" runat="server" CssClass="txtInput" MaxLength="20"></asp:TextBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="txtCustomer_Phone" SetFocusOnError="true" ErrorMessage="Please input Customer Phone" Display="Dynamic" ID="RequiredFieldValidator5" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                   
                        <tr>
                            <td class="title">Fax:</td>
                            <td class="input">
                                <asp:TextBox ID="txtCustomer_Fax" runat="server" CssClass="txtInput" MaxLength="20"></asp:TextBox>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Email:</td>
                            <td class="input">
                                <asp:TextBox ID="txtCustomer_Email" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                            </td>
                            <td class="title title_n1">Company Address :</td>
                            <td class="input" colspan="3">
                                <asp:TextBox ID="txtCompany_Address" runat="server" CssClass="txtInput" MaxLength="100" Width="505px"></asp:TextBox>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Contact name 1:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Name_1" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                            </td>
                            <td class="title title_n1">Email:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Email_1" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                            </td>
                            <td class="title title_n1">Phone:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Phone_1" runat="server" CssClass="txtInput" MaxLength="20"></asp:TextBox>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Contact name 2:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Name_2" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                            </td>
                            <td class="title title_n1">Email:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Email_2" runat="server" CssClass="txtInput" MaxLength="50"></asp:TextBox>
                            </td>
                            <td class="title title_n1">Phone:</td>
                            <td class="input">
                                <asp:TextBox ID="txtContact_Phone_2" runat="server" CssClass="txtInput" MaxLength="20"></asp:TextBox>
                            </td>
                        </tr>
                        <%--Attach file--%>
                        <tr>
                            <td class="title"><asp:Label runat="server" ID="lblAttachments">Attach files: </asp:Label></td>
                            <td class="input" colspan="3">
                                <asp:Repeater ID="rptAttachments" runat="server">
                                    <ItemTemplate>
                                        <asp:Image ID="imgType" runat="server" AlternateText=" " ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/Icons/unknown.png") %>' />
                                        <asp:Label ID="Label1" Text='<%# Eval("p.FileName") %>' runat="server" />
                                        
                                        <asp:ImageButton ID="ibtnDownload" runat="server" AlternateText=" " ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/Download.gif") %>'
                                            CommandName="DownloadItem" CommandArgument='<%# Eval("p.FileID") %>' />
                                        <asp:ImageButton ID="ibtnDelete" runat="server" AlternateText=" " ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/delete.gif") %>'
                                            CommandName="DeleteItem" CommandArgument='<%# Eval("p.ServerFileName") %>' />
                                    </ItemTemplate>
                                </asp:Repeater>
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="title">Add attach file: </td>
                            <td class="input" colspan="3">
                                <NeatUpload:InputFile ID="file1" runat="server"  />
                                <NeatUpload:ProgressBar ID="progressBar" runat="server"></NeatUpload:ProgressBar>
                                <portal:mojoButton ID="btnUpload" runat="server" Text="Upload" ValidationGroup="subm" Visible="false" OnClientClick="return document.getElementById('ctl00_mainContent_hidId').value!=''"  />
                            </td>
                        </tr>
                        <%--end attach file--%>
                       

                        <%--------------------------------------------------------------------%>
                        <tr >
                            <td colspan="4">
                                <table cellpadding=0 cellspacing=0 border=0>
                                    <tr class="div_title_parent">
                                        <td class="div_title div_title_group">OTHER INFORMATION:</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Account manager:</td>
                            <td class="input" colspan="3">
                                <telerik:RadComboBox ID="cboAccount_Manager" AllowCustomText="true" runat="server" CssClass ="cbo_rad" Width="200px" EmptyMessage="" Filter="StartsWith"></telerik:RadComboBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="cboAccount_Manager" SetFocusOnError="true" ErrorMessage="Please select a account name" Display="Dynamic" ID="RequiredFieldValidator6" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Assigned to:</td>
                            <td class="input" colspan="3">
                                <telerik:RadComboBox ID="cboAssigned_To" AllowCustomText="true" runat="server" CssClass ="cbo_rad" Width="200px" EmptyMessage="" Filter="StartsWith"></telerik:RadComboBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="cboAssigned_To" SetFocusOnError="true" ErrorMessage="Please select a account name" Display="Dynamic" ID="RequiredFieldValidator7" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="title">Note:</td>
                            <td class="input" colspan="3">
                                <mpe:EditorControl  ID="txtNotes" runat="server" Width="600" ></mpe:EditorControl>
                                
                            </td>
                        </tr>

                        <tr>
                            <td class="title">Status:</td>
                            <td class="input" colspan="3">
                                <telerik:RadComboBox ID="cboCAT_Contract_Status_ID" AllowCustomText="true" runat="server" CssClass ="cbo_rad" Width="200px" EmptyMessage="" Filter="StartsWith" ></telerik:RadComboBox>
                                <span class="star">(*)</span>
                                <asp:RequiredFieldValidator ControlToValidate="cboCAT_Contract_Status_ID" SetFocusOnError="true" ErrorMessage="Please select a Contract Status ID" Display="Dynamic" ID="RequiredFieldValidator8" runat="server" ></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="title">Send email?</td>
                            <td class="input"><asp:CheckBox ID="chkSendEmail" runat="server" CssClass="chkInput" Checked="true"></asp:CheckBox></td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                        
                         <tr style="display:none">
                            <td class="title">Ative:</td>
                            <td class="input"><asp:CheckBox ID="chkActive" runat="server" CssClass="chkInput" Checked="true" Enabled="false"></asp:CheckBox></td>
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>

                        <%--
                        <tr>
                            <td class="title title_footer" colspan="4">
                                Create by: <asp:Label ID="lblCreatedBy" runat="server"></asp:Label>
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                Created On: <asp:Label ID="lblCreatedOn" runat="server"></asp:Label>
                            </td>
                        </tr>--%>

                        <tr><td><br /></td></tr>
                        <tr class="tr_action">
                            <td></td>
                            <td>
                                <asp:Button ID='btnSave' runat="server" CssClass="btn_01 btn_save" Text="Save" />                                
                                <button id="reset" class="btn_01" type="reset">Reset</button>
                                &nbsp;&nbsp;
                                <%--<a href="javascript:history.back();" class="go_back">Go back</a>--%>
                                <a href="/gsdmsmodule/contract/contract_cat.aspx" class="go_back">Go back</a>
                            </td>
                        </tr>
                        <tr>
                            <td class="title"></td>
                            <td class="input"><asp:Label ID="lblMes" runat="server" Visible="false" CssClass="lblMes"></asp:Label></td>
                        </tr>
                    </table>

                </div>

<%--                </ContentTemplate>
            </asp:UpdatePanel>--%>
                
            </fieldset>
        </div>
        </portal:mojoPanel>
        <div class="cleared"></div>
    </asp:Panel>
    <mp:CornerRounderBottom id="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
